In telephone systems, the keyboard interface is conventionally arrayed in a key matrix comprising a column group and a row group. Each key is mapped to an intersection between one column and one row. Generally, the various known scanning methods could be classified into two different types.
In discussing keyboard scanning by keyboard interfaces reference will be made to "output ports" and "input ports". Output ports will be understood to be those through which the state of a key will actually be sensed (e.g. by transmitting a signal related to the state of a key). Each input port will typically be connected to a plurality of keys (e.g. each in a different column) and a scan signal transmitted by the output nodes will select one of them by selecting, e.g., the column being scanned and, therefore, the particular key corresponding to each input node for that column.
In a first type of keyboard interface, the keyboard interface ports are divided into two groups, a column group and a row group. If the column group of the keyboard interface ports is always assigned as input ports and the row group is always assigned as output ports, when the row group (output ports) transmits a scanning signal, the column group (input ports) will be scanned and detected by the scanning signal coming from row group (output ports) and the status of keyboard will be recorded accordingly.
In the second type of keyboard interface, the Column group and the row group of the keyboard interface are interchanged as input ports and output ports, respectively. This means that when the column group transmits the scanning signal (the column group is assigned as output ports at this moment), the row group will automatically become input ports which will be scanned by the signal coming from output ports, and the status of input ports is therefore detected. If the row group are assigned as output ports which transmit the scanning signal, the column group will become input ports to take charge of the detecting task. Such interaction completes the keyboard detecting operation.
Assuming that there are N keyboard interface ports in above mentioned two types of scanning keyboard interfaces, the maximum number of keys that can be arranged on the keyboard is only N.sup.2 /4 (if N is an odd number) or (N.sup.2 -1)/4 (if N is an even number). Therefore, the relatively small number of keys that can be detected is a disadvantage of the conventional keyboard interface.
Theoretically, for a keyboard interface with N interface ports, the maximum number of detected keys formed on a keyboard will be equal to the number of combinations of N objects taken two at a time, C(N,2)(i.e. N(N-1)/2). The extended time-shared scanning technique of the present invention achieves this objective. Instead of assigning keyboard interface ports with the fixed duty of input ports and output ports for the column group and row group, respectively (as in the first type keyboard interface described previously), or interchanging input ports and output ports for the column group and row group (as in the second type keyboard interface described previously), in our invention, the time-shared scanning technique makes the interface ports absolutely independent of each other and they play the role of both input ports or output ports alternatively. By means of the time-shared scanning keyboard interface, the detecting signal is applied to scan each interface port sequentially in the process of scanning, making that port an output port. Each port is associated with a particular group (e.g. column) of keys as an output port. No matter which port is the output port, the rest of the ports (N-1 interface ports) will automatically become input ports, and each will be associated with one of the particular group of keys. Each input port then permits sensing and recording the status of the corresponding key. These scanning and detecting operations repeat in consecutive phases, with each port becoming an output port in turn and a corresponding, different group of keys being sensed by the remaining ports.
The architecture of the our invention, the improved keyboard interface combining the time-shared scanning technique and keyboard detecting concepts, maximizes the number of keys detected and results in efficient performance and cost reduction.